from django.urls import path,re_path
from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView,TokenVerifyView
from .views import UserRegisterView,CheckPhoneView,SendSmsCodeView,SmsLoginView,SmsLogin

urlpatterns = [
    path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('refresh/', TokenRefreshView.as_view(), name='token_refresh'),
    path('verify/', TokenVerifyView.as_view(), name='token_verify'),
    path('reg/',UserRegisterView.as_view()),
    re_path(r'^checkphone/(?P<phone>1[3-9]\d{9})/$', CheckPhoneView.as_view()),
    re_path(r'^sendsmscode/(?P<phone>1[3-9]\d{9})/$', SendSmsCodeView.as_view()),
    re_path(r'^smslogin/(?P<phone>1[3-9]\d{9})/$', SmsLoginView.as_view()),
    path('smslogin/', SmsLogin.as_view()),
]